* Makefile.in (uninstall): Don't remove the lisp and etc
authorJim Blandy <jimb@redhat.com>
Thu, 17 Jun 1993 00:50:19 +0000 (00:50 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 17 Jun 1993 00:50:19 +0000 (00:50 +0000)
directories if they're in the source tree.

Makefile.in

index 0dcc2fe04d8daec4a61ff2f85be96ba80296baf2..101fd8d75d25ce402bbb916601195f946c47e19a 100644 (file)
@@ -388,22 +388,24 @@ mkdir: FRC.mkdir
 ### Delete all the installed files that the `install' target would
 ### create (but not the noninstalled files such as `make all' would
 ### create).
+###
+### Don't delete the lisp and etc directories if they're in the source tree.
 uninstall:
-       (cd lib-src; \
-        $(MAKE) ${MFLAGS} uninstall
-           prefix=${prefix} exec_prefix=${exec_prefix}
+       (cd lib-src;                                    \
+        $(MAKE) ${MFLAGS} uninstall                    \
+           prefix=${prefix} exec_prefix=${exec_prefix} \
            bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir})
-       rm -f ${lispdir} ${etcdir}
-       case ${lispdir} in \
-         ${datadir}/emacs/${version}/* ) \
-           rm -rf ${datadir}/emacs/${version} \
-         ;; \
-       esac
-       case ${etcdir} in \
-         ${datadir}/emacs/${version}/* ) \
-           rm -rf ${datadir}/emacs/${version} \
-         ;; \
-       esac
+       for dir in ${lispdir} ${etcdir} ; do            \
+         case `(cd $${dir} ; pwd)` in                  \
+           `(cd ${srcdir} ; pwd)`* ) ;;                \
+           * ) rm -rf $${dir} ;;                       \
+         esac ;                                        \
+         case $${dir} in                               \
+           ${datadir}/emacs/${version}/* )             \
+             rm -rf ${datadir}/emacs/${version}        \
+           ;;                                          \
+         esac ;                                        \
+       done
        (cd ${infodir}; rm -f cl* emacs* forms* info* vip*)
        (cd ${mandir};  rm -f emacs.1 etags.1 ctags.1)
        (cd ${bindir};  rm -f emacs-${version} emacs)